$(function(){
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(is_chrome){
	//FOR chrome ;*
	$(".screenuploader")[0].onpaste = function(event){
								  var items = event.clipboardData.items;
								  var blob = items[0].getAsFile();
								  var reader = new FileReader();
								  reader.onload = function(event){
										$(".screenshot-class").val(event.target.result);
										$(".screenuploader").html("Please wait... <br /> <img src='ajax-loader.gif' alt='Please wait' />")
										 $('body:first').fadeTo('slow', 0.3, function() {
												$('.form-send').submit();
										});
	
									}; 
								  reader.readAsDataURL(blob); 
								};
	}else{
	//FOR firefox ;< fucking shit
		$(".screenuploader").attr("contenteditable", true);
		$(".screenuploader")[0].onpaste = function(event){
							setTimeout(function(){
							$(".screenshot-class").val($(".screenuploader img:first").attr("src"));
								$(".screenuploader img:first").remove();
										 $('body:first').fadeTo('slow', 0.3, function() {
												$('.form-send').submit();
										});
							}, 200);
							
							return true;
				};
								
	};
});